home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / Dots & Pixels / Rudimentary Documentation / Class descriptions.note next >
Text File  |  1995-09-29  |  6KB  |  116 lines

  1.  
  2. classes defined in 'Mac Interface µ':
  3. ==
  4. == Macintosh specific classes:
  5. == (need a 8 bit display where successive pixels on every row of the screen
  6. == can be memory addressed in successive byte positions)
  7. ==
  8. Classs name        Contents and intended use:
  9.  
  10. ==
  11. == Minimal Mac interface classes (do not follow Apple Human Interface GuideLines):
  12. ==
  13. application        Quick hack which initializes the toolbox for you
  14.  
  15. depthchange        a quick and dirty way to switch bit-depths on monitor
  16.  
  17. port            color grafport
  18.  
  19. window            for non-movable windows on a Macintosh screen
  20.  
  21. fullscreen        fullscreen windows, hide the menu bar and can switch depth
  22.  
  23. gworld            offscreen gworlds, extended with some member functions
  24.                 for the generation of random pixel arrays
  25.  
  26. soundchannel    simple way to generate beeps of various frequencies and durations
  27.  
  28. stopwatch        simple interface to the extended time manager
  29.  
  30. vretrace        simplest way I know of to use VBLs. Note: this code needs
  31.                 a resource of type 'VBL ', #128 to be present. This resource
  32.                 should contain the VBL code, and should have the Locked and
  33.                 System bits set. The code for the resource can be found in
  34.                 'vretrace.c', the ResEdit file 'VBL.rsrc' contains a compiled
  35.                 version.
  36. ==
  37. == Classes for the creation of random dot displays:
  38. ==
  39. screenarea        A part of the screen, which is 2^n x 2^n pixels in size.
  40.                 Addressable as a two-dimensional array.
  41.                 Allows for some rows to lie outside the screen
  42.  
  43. screendots        A collection of dots on a screenarea, displayed using
  44.                 a fixed 'difference color'. Dots are represented by the screen
  45.                 address one needs to write to to set or clear them, so that
  46.                 these do not have to be recalculated from the dot positions
  47.                 (stored in a dotcollection) when erasing earlier set dots.
  48.                 This is a virtual base class; a subclass of it must specify
  49.                 which screen addresses to write to by overriding
  50.                 'void compute_addresses()'. Subclass of screenarea.
  51.  
  52. dotcollection    A collection of 2D dot positions at 16 bit accuracy. Used to
  53.                 remember the positions of individual dots in 2D space, for
  54.                 instance to be able to displace a collection of dots according
  55.                 to a certain optic flow.
  56.  
  57. phaser            Used to implement limited-lifetime stimuli. Specifically, it can
  58.                 be used to treat a stimulus of a large number of dots as n
  59.                 interwoven stimuli with the specified lifetime = frequency, but
  60.                 differing phases (e.g. a 300 dot stimulus in which 100 dots are
  61.                 replaced at every timestep, giving a dot lifetime of 3)
  62.  
  63. noisedots        Subclass of screendots which generates spatio-temporal white
  64.                 (am not 100% sure whether that term is appropiate here) noise.
  65.                 Free parameters are the number of dots and their lifetime.
  66.                 The dots initially are uniformly distributed on the screenarea,
  67.                 and number_of_dots / lifetime dots are given a new position at
  68.                 every timestep. The new positions are drawn from a uniform
  69.                 distribution.
  70.  
  71. movingnoisedots    Subclass of screendots which generates spatio-temporal noise.
  72.                 Free parameters are the number of dots, their lifetime, and their
  73.                 'diffusion constant'.
  74.                 The dots initially are uniformly distributed on the screenarea,
  75.                 and number_of_dots / lifetime dots are given a new position at
  76.                 every timestep. The new positions are drawn from all positions
  77.                 in a square of size indicated by the 'diffusion constant' around
  78.                 the old position. Thus the dots move at a user-specifiable speed,
  79.                 but in a randomly varying direction. If this movement moves the
  80.                 dot outside the screenarea it is given a new position drawn from a
  81.                 uniform distribution on the entire screenarea. Every lifetime
  82.                 timesteps the dot is given a new position drawn from an uniform
  83.                 distribution, regardless of whether it is moved outside of the
  84.                 screenarea.
  85.                 This implies that setting lifetime to one makes 'movingnoisedots'
  86.                 equal to 'noisedots' with lifetime 1, and setting the diffusion
  87.                 constant to zero makes 'movingnoisedots' with lifetime n equal to
  88.                 'noisedots' with lifetime n.
  89.                 Implementation note: the square around the old position is not
  90.                 completely symmetric (we use a n-bit signed binary number for it)
  91.                 Thus, a slight drift is present in every instance of movingnoisedots
  92.                 However, the drift really slight; on average 1/65536 unit per
  93.                 stimulus frame in dotcollection coordinates. This corresponds to
  94.                 1/128 or 1/256 pixel per stimulus frame in a 512x512 resp. 256x256
  95.                 pixel stimulus. Even at 90 stimulus frames per second (i.e. screen
  96.                 refresh rate for a fast monitor) that boils down to less than a
  97.                 pixel per second. At 72 pixels/inch (i.e. screen resolution of a
  98.                 not-so-good monitor) that is 1/72"/s which is less than 0.4 mm/s,
  99.                 or to less than 0.08°/s (5 arc minute /s) at a viewing distance
  100.                 of 30cm.
  101.  
  102. scrolling_noise    used to create simple scrolling random Pixel arrays
  103.  
  104. stereopair        a pair of gworld's, can be used to built red-green stereograms
  105.  
  106. flowdots        Subclass of screendots which generates flow patterns.
  107.                 Free parameters are the number of dots, their lifetime, and the
  108.                 flow according to which they move. The flow can be varied by
  109.                 calling appropiate member functions.
  110.                 The dots initially are uniformly distributed on the screenarea,
  111.                 and number_of_dots / lifetime dots are given a new position at
  112.                 every timestep. The other dots move according to the optic flow
  113.                 specified. Any dot thus moving outside of the screenarea and the
  114.                 dots to be replaced are given a new position drawn from a uniform
  115.                 distribution on the entire screenarea.
  116.